home *** CD-ROM | disk | FTP | other *** search
/ Champak 140 / (Vol 140) Sep 19 2011.iso / Games / red_cross_eru.swf / scripts / __Packages / gamebase / utils / DrawUtils.as < prev    next >
Text File  |  2011-09-19  |  12KB  |  333 lines

  1. §§push(true);
  2. §§push(false);
  3. §§push(false);
  4. §§push(true);
  5. while(true)
  6. {
  7.    if(┬º┬ºpop())
  8.    {
  9.    }
  10.    if(┬º┬ºpop())
  11.    {
  12.    }
  13.    if(┬º┬ºpop())
  14.    {
  15.       break;
  16.    }
  17.    ┬º┬ºpush(true);
  18.    ┬º┬ºpush(false);
  19. }
  20. if(!e.f)
  21. {
  22.    e.f = new g();
  23. }
  24. §§pop();
  25. if(!e.f.h)
  26. {
  27.    e.f.h = new g();
  28. }
  29. §§pop();
  30. if(!e.f.h[§§constant(4)])
  31. {
  32.    var _loc2_ = f.h[┬º┬ºconstant(4)] = function()
  33.    {
  34.    }[┬º┬ºconstant(5)];
  35.    f.h[┬º┬ºconstant(4)] = function()
  36.    {
  37.    }[┬º┬ºconstant(6)] = function()
  38.    {
  39.       return eval(┬º┬ºconstant(7))[┬º┬ºconstant(9)](eval(┬º┬ºconstant(7))[┬º┬ºconstant(8)]() * 16777215);
  40.    };
  41.    f.h[┬º┬ºconstant(4)] = function()
  42.    {
  43.    }[┬º┬ºconstant(10)] = function(mc, x, y, w, h, c)
  44.    {
  45.       mc[┬º┬ºconstant(11)](x,y);
  46.       mc[┬º┬ºconstant(12)](c);
  47.       mc[┬º┬ºconstant(13)](x + w,y);
  48.       mc[┬º┬ºconstant(13)](x + w,y + h);
  49.       mc[┬º┬ºconstant(13)](x,y + h);
  50.       mc[┬º┬ºconstant(13)](x,y);
  51.       mc[┬º┬ºconstant(14)]();
  52.    };
  53.    f.h[┬º┬ºconstant(4)] = function()
  54.    {
  55.    }[┬º┬ºconstant(15)] = function(mc, x, y, w, h)
  56.    {
  57.       mc[┬º┬ºconstant(11)](x,y);
  58.       mc[┬º┬ºconstant(13)](x + w,y);
  59.       mc[┬º┬ºconstant(13)](x + w,y + h);
  60.       mc[┬º┬ºconstant(13)](x,y + h);
  61.       mc[┬º┬ºconstant(13)](x,y);
  62.    };
  63.    f.h[┬º┬ºconstant(4)] = function()
  64.    {
  65.    }[┬º┬ºconstant(16)] = function(mc, x, y, w, h, fill_col, fill_alpha, line_width, line_col, line_alpha)
  66.    {
  67.       mc[┬º┬ºconstant(17)](line_width,line_col,line_alpha);
  68.       mc[┬º┬ºconstant(11)](x,y);
  69.       mc[┬º┬ºconstant(12)](fill_col,fill_alpha);
  70.       mc[┬º┬ºconstant(13)](x + w,y);
  71.       mc[┬º┬ºconstant(13)](x + w,y + h);
  72.       mc[┬º┬ºconstant(13)](x,y + h);
  73.       mc[┬º┬ºconstant(13)](x,y);
  74.       mc[┬º┬ºconstant(14)]();
  75.    };
  76.    f.h[┬º┬ºconstant(4)] = function()
  77.    {
  78.    }[┬º┬ºconstant(18)] = function(mc, x, y, r, style)
  79.    {
  80.       if(!mc[┬º┬ºconstant(19)])
  81.       {
  82.          mc[┬º┬ºconstant(19)] = mc[┬º┬ºconstant(21)](┬º┬ºconstant(19),mc[┬º┬ºconstant(20)]());
  83.       }
  84.       mc[┬º┬ºconstant(19)][┬º┬ºconstant(11)](x + r,y);
  85.       mc[┬º┬ºconstant(19)][┬º┬ºconstant(17)](1,16777215);
  86.       var _loc7_ = eval(┬º┬ºconstant(7))[┬º┬ºconstant(22)](style * 3.141592653589793 / 180);
  87.       var _loc1_ = 45;
  88.       while(_loc1_ <= 360)
  89.       {
  90.          var _loc4_ = r * eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](_loc1_ * 3.141592653589793 / 180);
  91.          var _loc3_ = r * eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)](_loc1_ * 3.141592653589793 / 180);
  92.          var _loc6_ = _loc4_ + r * _loc7_ * eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)]((_loc1_ - 90) * 3.141592653589793 / 180);
  93.          var _loc5_ = _loc3_ + r * _loc7_ * eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)]((_loc1_ - 90) * 3.141592653589793 / 180);
  94.          mc[┬º┬ºconstant(19)][┬º┬ºconstant(25)](_loc6_ + x,_loc5_ + y,_loc4_ + x,_loc3_ + y);
  95.          _loc1_ += 45;
  96.       }
  97.    };
  98.    f.h[┬º┬ºconstant(4)] = function()
  99.    {
  100.    }[┬º┬ºconstant(26)] = function(mc, x, y, r, angstep, clr, alph, line_alpha, line_clr)
  101.    {
  102.       if(alph == undefined)
  103.       {
  104.          alph = 100;
  105.       }
  106.       if(line_alpha == undefined)
  107.       {
  108.          line_alpha = alph;
  109.       }
  110.       if(line_clr == undefined)
  111.       {
  112.          line_clr = clr;
  113.       }
  114.       var _loc11_ = x + 0 * r;
  115.       var _loc10_ = y - 1 * r;
  116.       mc[┬º┬ºconstant(11)](_loc11_,_loc10_);
  117.       mc[┬º┬ºconstant(17)](0,line_clr,line_alpha);
  118.       mc[┬º┬ºconstant(12)](clr,alph);
  119.       var _loc1_ = angstep;
  120.       while(_loc1_ <= 360)
  121.       {
  122.          var _loc3_ = x + eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)](_loc1_ * 3.141592653589793 / 180) * r;
  123.          var _loc2_ = y - eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](_loc1_ * 3.141592653589793 / 180) * r;
  124.          mc[┬º┬ºconstant(13)](_loc3_,_loc2_);
  125.          _loc1_ += angstep;
  126.       }
  127.       mc[┬º┬ºconstant(14)]();
  128.    };
  129.    f.h[┬º┬ºconstant(4)] = function()
  130.    {
  131.    }[┬º┬ºconstant(27)] = function(mc, cx, cy, w, h, clr, alph, line_clr, line_alpha)
  132.    {
  133.       mc[┬º┬ºconstant(17)](1,line_clr,line_alpha);
  134.       mc[┬º┬ºconstant(11)](cx,cy);
  135.       mc[┬º┬ºconstant(12)](clr,alph);
  136.       var _loc1_ = 0;
  137.       while(_loc1_ <= 360)
  138.       {
  139.          var _loc3_ = eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)](0.017453292519943295 * (- _loc1_)) * w + cx;
  140.          var _loc2_ = eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](0.017453292519943295 * (- _loc1_)) * h + cy;
  141.          mc[┬º┬ºconstant(13)](_loc3_,_loc2_);
  142.          _loc1_ += 4;
  143.       }
  144.       mc[┬º┬ºconstant(14)]();
  145.    };
  146.    f.h[┬º┬ºconstant(4)] = function()
  147.    {
  148.    }[┬º┬ºconstant(28)] = function(mc, x, y, r, ang, angstep, clr, alph)
  149.    {
  150.       if(alph == undefined)
  151.       {
  152.          alph = 100;
  153.       }
  154.       mc[┬º┬ºconstant(17)](0,clr,alph);
  155.       mc[┬º┬ºconstant(11)](x,y);
  156.       mc[┬º┬ºconstant(12)](clr,alph);
  157.       var _loc1_ = 0;
  158.       while(_loc1_ <= ang)
  159.       {
  160.          var _loc3_ = x + eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)](_loc1_ * 3.141592653589793 / 180) * r;
  161.          var _loc2_ = y - eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](_loc1_ * 3.141592653589793 / 180) * r;
  162.          mc[┬º┬ºconstant(13)](_loc3_,_loc2_);
  163.          _loc1_ += angstep;
  164.       }
  165.       mc[┬º┬ºconstant(13)](x,y);
  166.       mc[┬º┬ºconstant(14)]();
  167.    };
  168.    f.h[┬º┬ºconstant(4)] = function()
  169.    {
  170.    }[┬º┬ºconstant(29)] = function(bmp, x, y, w, h, c)
  171.    {
  172.       var _loc2_ = x - w / 2;
  173.       while(_loc2_ <= x + w / 2)
  174.       {
  175.          var _loc1_ = y - h / 2;
  176.          while(_loc1_ <= y + h / 2)
  177.          {
  178.             bmp[┬º┬ºconstant(30)](_loc2_,_loc1_,c);
  179.             _loc1_ = _loc1_ + 1;
  180.          }
  181.          _loc2_ = _loc2_ + 1;
  182.       }
  183.    };
  184.    f.h[┬º┬ºconstant(4)] = function()
  185.    {
  186.    }[┬º┬ºconstant(31)] = function(bmp, x, y, w, h, c)
  187.    {
  188.       var _loc1_ = new eval(┬º┬ºconstant(32))[┬º┬ºconstant(33)][┬º┬ºconstant(34)](w,h,false,c);
  189.       bmp[┬º┬ºconstant(38)](_loc1_,new eval(┬º┬ºconstant(32))[┬º┬ºconstant(35)][┬º┬ºconstant(37)](0,0,w,h),new eval(┬º┬ºconstant(32))[┬º┬ºconstant(35)][┬º┬ºconstant(36)](x,y));
  190.       _loc1_[┬º┬ºconstant(39)]();
  191.       false;
  192.    };
  193.    f.h[┬º┬ºconstant(4)] = function()
  194.    {
  195.    }[┬º┬ºconstant(40)] = function(bmp, x, y, r, clr, alph, line_alpha, line_clr)
  196.    {
  197.       if(alph == undefined)
  198.       {
  199.          alph = 100;
  200.       }
  201.       if(line_alpha == undefined)
  202.       {
  203.          line_alpha = alph;
  204.       }
  205.       if(line_clr == undefined)
  206.       {
  207.          line_clr = clr;
  208.       }
  209.       var _loc4_ = _root[┬º┬ºconstant(21)](f.h[┬º┬ºconstant(41)][┬º┬ºconstant(42)](),_root[┬º┬ºconstant(20)]());
  210.       f.h[┬º┬ºconstant(4)][┬º┬ºconstant(26)](_loc4_,r,r,r,5,clr,alph,line_alpha,line_clr);
  211.       var _loc3_ = new eval(┬º┬ºconstant(32))[┬º┬ºconstant(33)][┬º┬ºconstant(34)](r * 2,r * 2,true,0);
  212.       _loc3_[┬º┬ºconstant(43)](_loc4_);
  213.       bmp[┬º┬ºconstant(38)](_loc3_,new eval(┬º┬ºconstant(32))[┬º┬ºconstant(35)][┬º┬ºconstant(37)](0,0,r * 2,r * 2),new eval(┬º┬ºconstant(32))[┬º┬ºconstant(35)][┬º┬ºconstant(36)](x - r,y - r));
  214.       _loc3_[┬º┬ºconstant(39)]();
  215.       false;
  216.       _loc4_[┬º┬ºconstant(44)]();
  217.    };
  218.    f.h[┬º┬ºconstant(4)] = function()
  219.    {
  220.    }[┬º┬ºconstant(45)] = function(bmp, text, x, y, w, h, c)
  221.    {
  222.       var _loc2_ = _root[┬º┬ºconstant(47)](┬º┬ºconstant(46),_root[┬º┬ºconstant(20)](),0,0,w,h);
  223.       _loc2_[┬º┬ºconstant(48)] = ┬º┬ºconstant(49);
  224.       _loc2_[┬º┬ºconstant(50)] = text;
  225.       var _loc3_ = new eval(┬º┬ºconstant(32))[┬º┬ºconstant(33)][┬º┬ºconstant(34)](w,h,false,c);
  226.       _loc3_[┬º┬ºconstant(43)](_loc2_);
  227.       bmp[┬º┬ºconstant(38)](_loc3_,new eval(┬º┬ºconstant(32))[┬º┬ºconstant(35)][┬º┬ºconstant(37)](0,0,w,h),new eval(┬º┬ºconstant(32))[┬º┬ºconstant(35)][┬º┬ºconstant(36)](x,y));
  228.       _loc3_[┬º┬ºconstant(39)]();
  229.       false;
  230.       _loc2_[┬º┬ºconstant(51)]();
  231.    };
  232.    f.h[┬º┬ºconstant(4)] = function()
  233.    {
  234.    }[┬º┬ºconstant(52)] = function(mc, x, y, startAngle, arc, radius, colr)
  235.    {
  236.       var _loc18_ = undefined;
  237.       var _loc1_ = undefined;
  238.       var _loc3_ = undefined;
  239.       var _loc4_ = undefined;
  240.       var _loc13_ = undefined;
  241.       var _loc7_ = undefined;
  242.       var _loc6_ = undefined;
  243.       var _loc12_ = undefined;
  244.       var _loc10_ = undefined;
  245.       var _loc11_ = undefined;
  246.       var _loc9_ = undefined;
  247.       mc[┬º┬ºconstant(17)](1,colr,100);
  248.       mc[┬º┬ºconstant(12)](colr);
  249.       mc[┬º┬ºconstant(11)](x,y);
  250.       if(eval(┬º┬ºconstant(7))[┬º┬ºconstant(53)](arc) > 360)
  251.       {
  252.          arc = 360;
  253.       }
  254.       _loc13_ = eval(┬º┬ºconstant(7))[┬º┬ºconstant(54)](eval(┬º┬ºconstant(7))[┬º┬ºconstant(53)](arc) / 45);
  255.       _loc18_ = arc / _loc13_;
  256.       _loc1_ = (- _loc18_ / 180) * 3.141592653589793;
  257.       _loc3_ = (- startAngle / 180) * 3.141592653589793;
  258.       if(_loc13_ > 0)
  259.       {
  260.          _loc7_ = x + eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](startAngle / 180 * 3.141592653589793) * radius;
  261.          _loc6_ = y + eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)]((- startAngle) / 180 * 3.141592653589793) * radius;
  262.          mc[┬º┬ºconstant(13)](_loc7_,_loc6_);
  263.          _loc7_ = x;
  264.          _loc6_ = y;
  265.          var _loc5_ = undefined;
  266.          _loc5_ = 0;
  267.          while(_loc5_ < _loc13_)
  268.          {
  269.             _loc3_ += _loc1_;
  270.             _loc4_ = _loc3_ - _loc1_ / 2;
  271.             _loc12_ = _loc7_ + eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](_loc3_) * radius;
  272.             _loc10_ = _loc6_ + eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)](_loc3_) * radius;
  273.             _loc11_ = _loc7_ + eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](_loc4_) * (radius / eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](_loc1_ / 2));
  274.             _loc9_ = _loc6_ + eval(┬º┬ºconstant(7))[┬º┬ºconstant(24)](_loc4_) * (radius / eval(┬º┬ºconstant(7))[┬º┬ºconstant(23)](_loc1_ / 2));
  275.             mc[┬º┬ºconstant(25)](_loc11_,_loc9_,_loc12_,_loc10_);
  276.             _loc5_ = _loc5_ + 1;
  277.          }
  278.          mc[┬º┬ºconstant(13)](x,y);
  279.          mc[┬º┬ºconstant(13)](_loc7_,_loc6_);
  280.          mc[┬º┬ºconstant(14)]();
  281.       }
  282.    };
  283.    f.h[┬º┬ºconstant(4)] = function()
  284.    {
  285.    }[┬º┬ºconstant(55)] = function(mc, left, right, top, bottom, edgeWidth, clr, alpha)
  286.    {
  287.       mc[┬º┬ºconstant(17)](0,clr,0);
  288.       mc[┬º┬ºconstant(11)](left,top);
  289.       mc[┬º┬ºconstant(12)](clr,alpha);
  290.       mc[┬º┬ºconstant(13)](right,top);
  291.       mc[┬º┬ºconstant(13)](right,top + edgeWidth);
  292.       mc[┬º┬ºconstant(13)](left,top + edgeWidth);
  293.       mc[┬º┬ºconstant(13)](left,top);
  294.       mc[┬º┬ºconstant(14)]();
  295.       mc[┬º┬ºconstant(11)](left,bottom);
  296.       mc[┬º┬ºconstant(12)](clr,alpha);
  297.       mc[┬º┬ºconstant(13)](right,bottom);
  298.       mc[┬º┬ºconstant(13)](right,bottom - edgeWidth);
  299.       mc[┬º┬ºconstant(13)](left,bottom - edgeWidth);
  300.       mc[┬º┬ºconstant(13)](left,bottom);
  301.       mc[┬º┬ºconstant(14)]();
  302.       mc[┬º┬ºconstant(11)](left,top + edgeWidth);
  303.       mc[┬º┬ºconstant(12)](clr,alpha);
  304.       mc[┬º┬ºconstant(13)](left,bottom - edgeWidth);
  305.       mc[┬º┬ºconstant(13)](left + edgeWidth,bottom - edgeWidth);
  306.       mc[┬º┬ºconstant(13)](left + edgeWidth,top + edgeWidth);
  307.       mc[┬º┬ºconstant(13)](left,top + edgeWidth);
  308.       mc[┬º┬ºconstant(14)]();
  309.       mc[┬º┬ºconstant(11)](right,top + edgeWidth);
  310.       mc[┬º┬ºconstant(12)](clr,alpha);
  311.       mc[┬º┬ºconstant(13)](right,bottom - edgeWidth);
  312.       mc[┬º┬ºconstant(13)](right - edgeWidth,bottom - edgeWidth);
  313.       mc[┬º┬ºconstant(13)](right - edgeWidth,top + edgeWidth);
  314.       mc[┬º┬ºconstant(13)](right,top + edgeWidth);
  315.       mc[┬º┬ºconstant(14)]();
  316.    };
  317.    f.h[┬º┬ºconstant(4)] = function()
  318.    {
  319.    }[┬º┬ºconstant(56)] = function(mc, rotRect, fill_col, fill_alpha)
  320.    {
  321.       mc[┬º┬ºconstant(17)](0,fill_col,0);
  322.       mc[┬º┬ºconstant(11)](rotRect[┬º┬ºconstant(57)][┬º┬ºconstant(59)],rotRect[┬º┬ºconstant(57)][┬º┬ºconstant(58)]);
  323.       mc[┬º┬ºconstant(12)](fill_col,fill_alpha);
  324.       mc[┬º┬ºconstant(13)](rotRect[┬º┬ºconstant(60)][┬º┬ºconstant(59)],rotRect[┬º┬ºconstant(60)][┬º┬ºconstant(58)]);
  325.       mc[┬º┬ºconstant(13)](rotRect[┬º┬ºconstant(61)][┬º┬ºconstant(59)],rotRect[┬º┬ºconstant(61)][┬º┬ºconstant(58)]);
  326.       mc[┬º┬ºconstant(13)](rotRect[┬º┬ºconstant(62)][┬º┬ºconstant(59)],rotRect[┬º┬ºconstant(62)][┬º┬ºconstant(58)]);
  327.       mc[┬º┬ºconstant(13)](rotRect[┬º┬ºconstant(57)][┬º┬ºconstant(59)],rotRect[┬º┬ºconstant(57)][┬º┬ºconstant(58)]);
  328.       mc[┬º┬ºconstant(14)]();
  329.    };
  330.    ┬º┬ºpush(┬º┬ºconstant(63)(f.h[┬º┬ºconstant(4)][┬º┬ºconstant(5)],null,1));
  331. }
  332. §§pop();
  333.